<?php 

require_once('../../../../../wp-config.php');

$todo_cat = $_GET['cat'];
$postajax = $_GET['postajax'];

if($todo_cat) :

	query_posts("posts_per_page=-1&category_name={$todo_cat}&order=DESC"); ?>

	<ul class="todo-list" style="list-style: none;">

	<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

	<li><strong><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></strong> von <?php the_author(); ?> unter <?php the_category(', '); ?></li>

	<?php endwhile; endif; ?>
	
	</ul>

<?php

elseif($postajax) :

	query_posts("p=$postajax"); ?>

	<?php if ( have_posts() ) : while ( have_posts() ) : the_post();

	the_excerpt();

	endwhile; endif;

endif;

?>